package lab02.test32;

import java.util.HashMap;
import java.util.Map;

public class Test32  {
    public static void main(String[] args) {
        //集合map
        /*
        key     value(一个entry)
        10001L   wu
        10002L   li*/
        Map<String,String> person = new HashMap<String, String>();

        person.put("id","1");
        person.put("name","张三");
        person.put("gender","男");
        person.put("age","25");
        person.put("love","爱学java");

        for (Map.Entry<String ,String > entry:person.entrySet()){
        System.out.println(entry.getKey()+" "+entry.getValue());
        }

        System.out.println("集合大小为："+person.size());
        System.out.println(person.get("age"));

        person.remove("age");
        System.out.println("集合现在大小："+person.size());
    }
}
